home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 30
/
Aminet 30 (1999)(Schatztruhe)[!][Apr 1999].iso
/
Aminet
/
util
/
conv
/
CarriageRet.lha
/
CarriageRet
/
AmigavisionsLib
/
DOSError.a
< prev
next >
Wrap
Text File
|
1999-01-03
|
3KB
|
120 lines
********************************************************************************
*
* Program: Print DOS Error Text
* Filename: DOSError.a
*
* Contents: Gibt den Fehlertext des zugehörigen DOS Fehlercodes
* nach _stderr aus.
*
* Language: 68000 Assembler
*
* Author: Johannes R. Geiss
*
* Copyright: Amigavisions
*
* History: $HISTORY:
* 1.3 (26-Oct-91) changed JRG
* 1.2 (14-Oct-91) changed JRG
* 1.1 (10-Oct-91) changed JRG
* 1.0 (05-Oct-91) written JRG
*
* Version: $VER: DOSError.a 1.3 (26-Oct-91)
*
********************************************************************************
*------ Includes
include 'xref.i'
include 'call.i'
*------ Imports
XLIB Write
xref _DOSBase
xref _stderr
*------ Exports
xdef DOSError
********************************************************************************
SECTION DOSError
*------ DOSError procedure
*
* Input: d0.l Error-Code (Returncode)
DOSError
tst.l d0
beq.s NoErr
movem.l d2-d3/a6,-(a7)
movea.l #NumTab,a0
movea.l #NT_End,a1
Loop cmp.l (a0)+,d0
beq.s Found
addq.l #4,a0
cmpa.l a0,a1
bne.s Loop
move.l #UknErr,d2
bra.s Cont
Found move.l (a0),d2
Cont move.l _stderr,d1
movea.l d2,a0
moveq.l #-1,d3
Loop2 addq.l #1,d3
tst.b (a0)+
bne.s Loop2
CALLDOS Write
movem.l (a7)+,d2-d3/a6
NoErr rts
********************************************************************************
section data,DATA
*------ Datafield
NumTab dc.l 103,e103,105,e105,120,e120,121,e121
dc.l 122,e122,202,e202,203,e203,204,e204
dc.l 205,e205,206,e206,209,e209,210,e210
dc.l 211,e211,212,e212,213,e213,214,e214
dc.l 215,e215,216,e216,218,e218,219,e219
dc.l 220,e220,221,e221,222,e222,223,e223
dc.l 224,e224,225,e225,226,e226,232,e232
dc.l 5,e5,10,e10,20,e20
NT_End
UknErr dc.b 'Unknown error',$0a,0
e103 dc.b 'Insufficient memory',$0a,0
e105 dc.b 'Task table full',$0a,0
e120 dc.b 'Argument line invalid or too long',$0a,0
e121 dc.b 'File is not an object module',$0a,0
e122 dc.b 'Invalid resident library',$0a,0
e202 dc.b 'Object in use',$0a,0
e203 dc.b 'Object already exists',$0a,0
e204 dc.b 'Directory not found',$0a,0
e205 dc.b 'Object not found',$0a,0
e206 dc.b 'Invalid window description',$0a,0
e209 dc.b 'Packet requested type unknown',$0a,0
e210 dc.b 'Invalid stream component name',$0a,0
e211 dc.b 'Invalid object lock',$0a,0
e212 dc.b 'Object not of required type',$0a,0
e213 dc.b 'Disk not validated',$0a,0
e214 dc.b 'Disk is write-protected',$0a,0
e215 dc.b 'Rename across devices attempted',$0a,0
e216 dc.b 'Directory not empty',$0a,0
e218 dc.b 'Device (or volume) not mounted',$0a,0
e219 dc.b 'Seek error',$0a,0
e220 dc.b 'Comment too big',$0a,0
e221 dc.b 'Disk full',$0a,0
e222 dc.b 'File is protected from deletion',$0a,0
e223 dc.b 'File is protected from writing',$0a,0
e224 dc.b 'File is protected from reading',$0a,0
e225 dc.b 'Not a DOS disk',$0a,0
e226 dc.b 'No disk in drive',$0a,0
e232 dc.b 'No more entries in directory',$0a,0
e5 dc.b 'WARNING',$0a,0
e10 dc.b 'ERROR',$0a,0
e20 dc.b 'FAILURE',$0a,0
END